From: Florian Müllner Date: Wed, 9 Mar 2011 15:40:48 +0000 (+0100) Subject: overview: Handle drag-cancelled signal for items X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8595 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6ae914da2f8f22fe1eae8e83958f4b46b93d0157;p=gnome-shell.git overview: Handle drag-cancelled signal for items Allow handling the drag-cancelled signal for non-window items, just like the handling for windows instroduced in commit a80e88e33. https://bugzilla.gnome.org/show_bug.cgi?id=644324 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index ffd49fa07..5017446cc 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -412,6 +412,10 @@ AppWellIcon.prototype = { this._removeMenuTimeout(); Main.overview.beginItemDrag(this); })); + this._draggable.connect('drag-cancelled', Lang.bind(this, + function () { + Main.overview.cancelledItemDrag(this); + })); this._draggable.connect('drag-end', Lang.bind(this, function () { Main.overview.endItemDrag(this); diff --git a/js/ui/overview.js b/js/ui/overview.js index 3bb478923..34ebec541 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -474,6 +474,10 @@ Overview.prototype = { this.emit('item-drag-begin'); }, + cancelledItemDrag: function(source) { + this.emit('item-drag-cancelled'); + }, + endItemDrag: function(source) { this.emit('item-drag-end'); }, diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index 0527d8f83..81fd89b19 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -49,6 +49,10 @@ SearchResult.prototype = { Lang.bind(this, function() { Main.overview.beginItemDrag(this); })); + draggable.connect('drag-cancelled', + Lang.bind(this, function() { + Main.overview.cancelledItemDrag(this); + })); draggable.connect('drag-end', Lang.bind(this, function() { Main.overview.endItemDrag(this);